<template>
	<div class="tab-own">
		<span class="title">{{title}}</span>
		<div class="item" 
			v-for="(v,i) in data" :key="i" @click="clickCurrent(v)">
			<span>{{v}}</span>
			<!-- <div class="show" v-if="showI == i">{{introduce[v]}}</div> -->
		</div>
		<tabDialog :title="currentData" ref="tabDialog" />
	</div>
</template>

<script>
import tabDialog from './dialog'
export default {
	components: { tabDialog },
	props: {
		title: String,
		data: Array
	},
	data() {
		return {
			showI: 0,
			currentData: '',
		}
	},
	methods: {
		clickCurrent(v) {
			this.currentData = v
			this.$refs.tabDialog.dialogVisible = true
		}
	}
}
</script>

<style lang="scss" scoped>

</style>